<?php

function dateFormat($date,$fmt = "m/d h:s")
{
    return date($fmt, $date);
}

function mediaFormat($mediahash,$thumb=false,$down=false)
{
    $murl = C("MEDIA_URL");
    $murl = str_replace("$1",$mediahash,$murl);
    if($thumb)
        $murl = str_replace("$2","1",$murl);
    else
        $murl =  str_replace("$2","0",$murl);

    if($down)
        $murl = str_replace("$3","1",$murl);
    else
        $murl =  str_replace("$3","0",$murl);

    return $murl;
}

?>